package com.assetmanage.service.impl;

import com.assetmanage.dao.DepartmentDao;
import com.assetmanage.dao.impl.DepartmentDaoImpl;
import com.assetmanage.model.Department;
import com.assetmanage.service.DepartmentService;

import java.util.List;

public class DepartmentServiceImpl implements DepartmentService {
    private DepartmentDao departmentDao = new DepartmentDaoImpl();

    @Override
    public List<Department> getAllDepartments() {
        return departmentDao.getAllDepartments();
    }

    @Override
    public Department getDepartmentById(String depId) {
        return departmentDao.getDepartmentById(depId);
    }

    @Override
    public boolean addDepartment(Department department) {
        return departmentDao.addDepartment(department);
    }

    @Override
    public boolean updateDepartment(Department department) {
        return departmentDao.updateDepartment(department);
    }

    @Override
    public boolean deleteDepartment(String depId) {
        return departmentDao.deleteDepartment(depId);
    }
} 